package org.yoki.edu.bg.radius.core.raw.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import org.yoki.edu.bg.radius.core.raw.infra.RadGroupReplyRepository;
import com.yunzhitx.cloud.common.model.ddd.InstanceFactory;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * 代码生成器自动生成
 * Date:2018-1-3 13:39:27
 * @author
 */
@Data
@Table(name = "radius_rad_group_reply")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class RadGroupReply implements Serializable{

	private static final long serialVersionUID = 1L;

    /** */
    @Column(name = "id")
    private Integer id;
    /** */
    @Column(name = "groupname")
	private String groupname;
    /** */
    @Column(name = "attribute")
	private String attribute;
    /** */
    @Column(name = "op")
	private String op;
    /** */
    @Column(name = "value")
	private String value;
	public RadGroupReply(){}

    public RadGroupReply(Integer id){setId(id);}

    private static RadGroupReplyRepository radGroupReplyRepository;
    public static RadGroupReplyRepository getRadGroupReplyRepository(){
		if(null==radGroupReplyRepository){
			radGroupReplyRepository = InstanceFactory.getInstance(RadGroupReplyRepository.class);
		}
    	return radGroupReplyRepository;
    }

    /**
    * 根据Id，更新RadGroupReply
    *
    * @param
    * @return
    */
    public void update() {
        getRadGroupReplyRepository().updateByPrimaryKeySelective(this);
    }

    /**
    * 根据主键ID查询RadGroupReply
    * @param id
    * @return
    */
    /*
    public static RadGroupReplyVO selectDetailById(int id) {
        RadGroupReplyVO vo = getRadGroupReplyRepository().selectDetailById(id);
        return vo;
    }
    */

}